package cn.cloud9;

import java.util.Random;

public class Demo8SwitchWithSeason {

    /**
     * https://www.bilibili.com/video/BV18J411W7cE?p=38
     * Switch 四季案例
     * @param args
     */
    public static void main(String[] args) {
        int month = new Random().nextInt(12) + 1;
        switch (month) {
            case 1:
            case 2:
            case 3:
                System.out.println("是春季");
                break;
            case 4:
            case 5:
            case 6:
                System.out.println("是夏季");
                break;
            case 7:
            case 8:
            case 9:
            case 10:
                System.out.println("是秋季");
                break;
            default:
                System.out.println("是冬季");
        }
    }
}
